﻿using System;

namespace Domain_Home
{
	class HostsLine
	{
		public bool IsComment { get; private set; }
		public string Destination { get; private set; }
		public string Host { get; private set; }
		private readonly string _line;

		public HostsLine(String line)
		{
			_line = line;
			if (line.StartsWith("#") || line.Equals(String.Empty))
			{
				IsComment = true;
			}
			else
			{
				IsComment = false;
				var split = line.Split(' ');
				Destination = split[0];
				Host = split[1];
			}
		}

		public override string ToString()
		{
			return _line;
		}
	}
}
